package com.wavehi.pojo;

import org.springframework.beans.factory.FactoryBean;

/**
 * @Author WaveHi
 * @Date 15/10/2021 下午 10:40
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description
 */
public class StudentFactory implements FactoryBean<Student> {
    private Student student;
    @Override
    public Student getObject() throws Exception {
        student = new Student("Tom");
        return student;
    }

    @Override
    public Class<?> getObjectType() {
        Class aClass = null;
        if(student != null) {
            aClass = student.getClass();
        }
        return aClass;
    }
}
